package com.itheima.dto;

import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Semaphore;
import java.util.concurrent.locks.ReentrantLock;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author ：yuan_he_song
 */
@Data
@Accessors(chain = true) // 支持链式返回
public class CartDto{

    private Integer salesId;

    private String salesName;

    private boolean isBuild;

    private List<GoodsDetailDto> cartList;

    public static void main(String[] args) throws Exception{
        ReentrantLock lock = new ReentrantLock();
        lock.newCondition();
        lock.lock();
        Semaphore semaphore = new Semaphore(2);
        semaphore.acquire();
        ExecutorService executorService = Executors.newFixedThreadPool(2);
        ThreadLocal<String> threadLocal = new ThreadLocal();
    }
}
